You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The ArrowScan class declares _downcast_ns_timestamp_to_us: bool | None as a class-level type annotation and documents all other attributes in the docstring, but this attribute was missing from the Attributes section.
What changes are included in this PR?
Adds one line to the ArrowScan class docstring documenting the _downcast_ns_timestamp_to_us attribute.
Looks good to me. The constant at L1767 contains "ON_WRITE", but the actual usage is on read in my understanding.
Hi @ebyhr, good catch on DOWNCAST_NS_TIMESTAMP_TO_US_ON_WRITE. It does seem to be used for writing in /pyiceberg/table/__init__.py (append(), overwrite(), upsert(), add_files()) and pyiceberg/io/pyarrow.py (write_file(), _dataframe_to_data_files()), while using it for schema inference in pyiceberg/catalog/__init__.py (_convert_schema_if_needed). It's really only in this ArrowScan where it's quite misleading.
I can create a separate PR to rename it to DOWNCAST_NS_TIMESTAMP_TO_US while keeping it backwards compatible since it's a user-facing variable, WDYT?
Edit: Opened a new PR (#3596) for renaming DOWNCAST_NS_TIMESTAMP_TO_US_ON_WRITE.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Which issue does this PR close?
Minor documentation gap (no issue).
Rationale for this change
The
ArrowScanclass declares_downcast_ns_timestamp_to_us: bool | Noneas a class-level type annotation and documents all other attributes in the docstring, but this attribute was missing from the Attributes section.What changes are included in this PR?
Adds one line to the
ArrowScanclass docstring documenting the_downcast_ns_timestamp_to_usattribute.Are there any user-facing changes?
No.